<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value = "添加" onclick = "add('张三','123')">&nbsp;&nbsp;&nbsp;
    <input type="button" value = "修改" onclick = "alter('张三','123456')">&nbsp;&nbsp;&nbsp;
    
    <script>
    add();
    //函数的形参甚至可以没有数据类型！
    function add(name, password){
        alert("添加信息成功!      "+"姓名："+name+"  密码："+password);
    }

    function alter(){
        alert("修改信息成功！！");
        for(var item of arguments){
            console.log(item);
        }
    }
    </script>

</body>
</html>